Skip to content

Update how-to-use-stored-procedures-triggers-udfs.md#364

Open
pietro29 wants to merge 1 commit intoMicrosoftDocs:mainfrom
pietro29:patch-1
Open

Update how-to-use-stored-procedures-triggers-udfs.md#364
pietro29 wants to merge 1 commit intoMicrosoftDocs:mainfrom
pietro29:patch-1

Conversation

@pietro29
Copy link
Copy Markdown

Fix python-sdk post-trigger invoke example

Fix python-sdk post-trigger invoke example
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit dcfdc40:

✅ Validation status: passed

File Status Preview URL Details
articles/cosmos-db/how-to-use-stored-procedures-triggers-udfs.md ✅Succeeded

For more details, please refer to the build report.

@ttorble
Copy link
Copy Markdown
Contributor

ttorble commented Apr 20, 2026

@markjbrown

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot requested a review from markjbrown April 20, 2026 16:00
@prmerger-automator prmerger-automator bot added the aq-pr-triaged C+L Pull Request Review Team label label Apr 20, 2026
@prmerger-automator
Copy link
Copy Markdown
Contributor

@pietro29 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Azure Cosmos DB documentation article to correct the Python SDK example for invoking a post-trigger.

Changes:

  • Switch the Python create_item example from pre_trigger_include to post_trigger_include in the “call a post-trigger” snippet.

item = {'category': 'Personal', 'name': 'Groceries',
'description': 'Pick up strawberries', 'isComplete': False}
container.create_item(item, pre_trigger_include='trgPreValidateToDoItemTimestamp')
container.create_item(item, post_trigger_include='trgPreValidateToDoItemTimestamp')
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python post-trigger invocation still references the pre-trigger id (trgPreValidateToDoItemTimestamp). In this section you register trgPostValidateToDoItemTimestamp, so this call won’t invoke the trigger that was just created. Update the post_trigger_include value to the post-trigger id used in the registration snippet to keep the sample runnable and consistent.

Suggested change
container.create_item(item, post_trigger_include='trgPreValidateToDoItemTimestamp')
container.create_item(item, post_trigger_include='trgPostValidateToDoItemTimestamp')

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants